#include <iostream>
#include <windows.h>
#include <time.h>


using namespace std;

void ptime (){
  time_t rawtime;
  struct tm * timeinfo;

  time ( &rawtime );
  timeinfo = localtime ( &rawtime );
  cout <<   asctime (timeinfo) ;

}
int main()
{
    cout << "CherryTomato- Pomodoro technique console timer" << endl;
    while(true){
        int j=1;
        ptime();
        cout << " Pomodoro " <<  j <<" started." << endl;
        for (int i =0 ; i< 25;i++){
        Sleep(60000);
        cout << ".";
        }
        cout << "completed"<< endl;
        j+=1;
    Beep(523,500);
    Beep(523,500);
    Beep(523,500);
    ptime();
    cout << " Break started." << endl;
    for (int i =0 ; i< 5;i++){
        Sleep(60000);
        cout << ".";
        }

    Beep(523,500);
    Beep(523,500);
        cout << "completed"<< endl;

    }
    return 0;
}
